package com.gzhryc.net_marketing.cloud.account.dao.enums;

public class CloudPayAccountWithdrawOrderEnum {

    public enum HandleType {

        ManualTransfer(1, "手动处理"),AutoTransfer(2, "自动处理");

        private Integer index;
        private String note;

        HandleType(Integer index, String note) {
            this.index = index;
            this.note = note;
        }

        public Integer index() {
            return index;
        }

        public String note() {
            return note;
        }

        public static String note(Integer index) {
            HandleType[] temp = HandleType.values();
            for (int i = 0; i < temp.length; i++) {
                HandleType item = temp[i];
                if (item.index.equals(index)) {
                    return item.note;
                }
            }
            return null;
        }
    }

    public enum OperatorType {

        Sys(1, "系统"), Manager(2, "客服");

        private Integer index;
        private String note;

        OperatorType(Integer index, String note) {
            this.index = index;
            this.note = note;
        }

        public Integer index() {
            return index;
        }

        public String note() {
            return note;
        }

        public static String note(Integer index) {
            OperatorType[] temp = OperatorType.values();
            for (int i = 0; i < temp.length; i++) {
                OperatorType item = temp[i];
                if (item.index.equals(index)) {
                    return item.note;
                }
            }
            return null;
        }
    }

    public enum TransferType {

        WXPay(1, "微信转账"), Alipay(2, "支付宝转账");

        private Integer index;
        private String note;

        TransferType(Integer index, String note) {
            this.index = index;
            this.note = note;
        }

        public Integer index() {
            return index;
        }

        public String note() {
            return note;
        }

        public static String note(Integer index) {
            TransferType[] temp = TransferType.values();
            for (int i = 0; i < temp.length; i++) {
                TransferType item = temp[i];
                if (item.index.equals(index)) {
                    return item.note;
                }
            }
            return null;
        }
    }

    public enum State {

        WaitVerify(1, "等待审核"),Processing(2, "处理中")
            ,Success(3, "转账成功"),Fail(4, "转账失败"),Reject(5, "驳回");

        private Integer index;
        private String note;

        State(Integer index, String note) {
            this.index = index;
            this.note = note;
        }

        public Integer index() {
            return index;
        }

        public String note() {
            return note;
        }

        public static String note(Integer index) {
            State[] temp = State.values();
            for (int i = 0; i < temp.length; i++) {
                State item = temp[i];
                if (item.index.equals(index)) {
                    return item.note;
                }
            }
            return null;
        }
    }
}
